package com.esint.validation.validators;

import com.esint.validation.entity.car.Engine;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @description: 自定义校验规则注解类
 * @author: 谷明
 * @createDate: 2021/8/13 1:36
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {EngineModuleTypeValidator.class})
public @interface EngineModuleTypeRule {

    // 校验出错时默认返回的消息
    String message() default "引擎型号格式错误";
    //分组校验
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
